<template>
	<view class="content page-set">
		<view class="content-top">
			<view class='cell-group right-img bm' v-for="(item,index) in dataList" :key="index">
				<view class='cell-item' @click="goArticleInfo(item.id)">
					<view class='cell-item-hd'>
						<view class='cell-hd-title'>{{item.title}}</view>
					</view>
					<view class='cell-item-ft'>
						<u-icon name="arrow-right" color="#0F1011"></u-icon>
					</view>
				</view>
			</view>
			
		</view>
		
	</view>
</template>

<script>
	export default {

		data() {
			return {
				dataList:[],
				curId:7,
				userInfo: {},
			}
		},
		onLoad(e) {
			if(e.id){
				this.curId=e.id
			}
			this.getData()
		},
		methods: {
			
			getData(){
				
					this.$api.articleList({
						categoryId:this.curId,
						pageNo: 1,
						pageSize: 50
					}, res => {
						if (res.code==200) {
							this.dataList= res.data.list
						}
					})
			}
		}
	}
</script>

<style lang="scss">
	page {
		background: #fff;
	}

	.agreement {
		position: fixed;
		bottom: 30rpx;
		left: 0;
		right: 0;
		padding: 44rpx;
		text-align: center;

		.btn {
			width: 100%;
			border-radius: 16rpx;
			padding: 15rpx;
		}
	}

	.color-o {
		margin: 0 10rpx;
	}

	.page-set {
		padding: 0 40rpx 40rpx;

		.cell-item {
			padding: 40rpx 0;
			margin: 0;
			width: auto;
		}

		.cell-hd-title {
			font-size: 28rpx;
			font-family: PingFang SC-Bold, PingFang SC;
			color: #0F1011;
		}
	}
</style>